package sopt.dev.data; 

import android.os.Parcel;
import android.os.Parcelable;


public class ItemVO extends Info implements Parcelable{

	private String cityName;
	private String name;
	private int iconPath;
	private String date;
	private double price;
	private String address;
	private String comment;
	private int payType;

	public enum PayType { CASH, CARD };
	
	public ItemVO(String cityName, String name, 
			String date, int type, double price, String picPath, String address, String comment, int payType) {
		
		this.cityName = cityName;
		this.picPath = picPath;
		this.iconPath = type;
		this.name = name;
		this.date = date;
		this.price = price;
		this.address = address;
		this.comment = comment;
		this.payType = payType;
	}

	public ItemVO(Parcel src) {
	
		cityName = src.readString();
		picPath = src.readString();
		iconPath = src.readInt();
		name = src.readString();
		date = src.readString();
		price = src.readDouble();
		address = src.readString();
		comment = src.readString();	
		payType = src.readInt();
	
	}


	public String getCityName() {
		return cityName;
	}
	
	public String getDate() {
		return date;
	}

	public String getPicPath() {
		return picPath;
	}
	public int getIconPath() {
		return iconPath;
	}
	public String getName() {
		return name;
	}
	public double getPrice() {
		return price;
	}
	public String getAddress() {
		return address;
	}
	
	public String getComment() {
		return comment;
	}
	
	public int getPayType() {
		return payType;
	}

	@Override
	public int describeContents() {
		
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(cityName);
		dest.writeString(picPath);
		dest.writeInt(iconPath);
		dest.writeString(name);
		dest.writeString(date);
		dest.writeDouble(price);
		dest.writeString(address);
		dest.writeString(comment);
		dest.writeInt(payType);
	}

	public static Parcelable.Creator<ItemVO> CREATOR = new Creator<ItemVO>() {

		@Override
		public ItemVO[] newArray(int size) {
			return new ItemVO[size];
		}

		@Override
		public ItemVO createFromParcel(Parcel src) {
			return new ItemVO(src);
		}
	};

	public void setComment(String comment) {
		this.comment = comment;
	}
}
